Skip to main content

All Questions

3votes
1answer
91views

Merge discrete integer intervals

What it does The code starts with a set of integer intervals, and can add new intervals (possibly by updating existing intervals). Essentially, it is a bit array whose index starts at ...
FromTheStackAndBack's user avatar
4votes
1answer
135views

Advanced Python Calculator using OOP

I've been into computer science fundamentals (proper data structures/algorithms/etc) including Object Oriented Programming. Therefore, I decided to reformat my old traditional Python Calculator into ...
Raphael Irvin's user avatar
1vote
2answers
108views

Object-Oriented Blackjack V2

[Edited] formatting and Flake8 linter corrections Four days ago I posted my first object oriented programming project. Everything I have learned to date is self-taught and posting project to receive ...
Infinite Grasp's user avatar
6votes
4answers
283views

Object-Oriented Blackjack

[Edited: added V2 link] BlackJack V2 - Github This is my first post, and I was actually going to post this on Stackoverflow when I was rather suggested posting the code here, as it may be better ...
Infinite Grasp's user avatar
3votes
1answer
118views

Segmentation of list to minimize the largest sum

I have written the following code for diving a list 'seq' into 'k' segments such that the maximum sum of each segment is minimized. I have used dynamic programming to solve this problem. But my class &...
Jahid Chowdhury Choton's user avatar
0votes
2answers
857views

Generates all pairs (combinations of 2) up to a limit (exclusive)

Any improvements on this combination generator. Seen a lot of combination generators online, but none like this. Found pseudocode at: https://www.baeldung.com/cs/generate-k-combinations Fastest I ...
Javier Munoz's user avatar
2votes
0answers
43views

JavaScript Linter in Java

I wrote a simple Linter that checks for matching opening and closing braces for one line of JavaScript. It utilizes a stack to store opening braces found in the line, then compares the first closing ...
dbrokamp's user avatar
5votes
4answers
3kviews

C++ basic bank money class

I am trying to create a basic money class that fits into a small console banking application I am making. Money.h ...
mathewsjoyy's user avatar
2votes
1answer
645views

red black tree implementation in cpp

I am learning algorithms and trying to implement them in c++, I have chosen to try to implement a red-black tree due to its self-balancing properties and its ability to stop the worst case of O(n) ...
paigelarry342's user avatar
0votes
2answers
485views

c++ Most clean way to implement duplicate Binary Search Tree for complex type

I have tried to make my own implementation for a BST task I was given for a complex type (Transaction), that should be able to store duplicate values as well. However, I am not sure if I have gone ...
paigelarry342's user avatar
7votes
2answers
334views

ASCII-based OOP blackjack game in Python

I'm new to programming and have been teaching myself to code for about 6 months. Since I have no one to ask about any of coding-related questions, I may have developed bad habits in the meantime, but ...
e1630m's user avatar
3votes
2answers
165views

Finding Number of Objects in Image

I wrote a program that, given a 2D array representing pixels in a birds eye view image, it returns the number of Objects in the image. Pixels that are connected in the up, down, left, and right ...
MPC's user avatar
  • 51
1vote
1answer
208views

Rock paper scissors coding assignment

I had a coding assignment to write a Rock Paper Scissors game. The main task is not to show a solution but rather to test the coding style. The rules are such: Problem: rock is "O", paper is ...
Harton's user avatar
1vote
2answers
126views

checking is ellipse is filled or not

following code below works fine but feels kind of a mess. Any one has a better way to do this? I am creating a basic "Enter Pin" to unclick screen on an app. So if the user enters the 1st ...
dave's user avatar
2votes
2answers
192views

Parking places design

I got a question: Design a parking system. There are 3 types of parking spaces: big, medium and small. Implement ParkingSystem class(int big, int medium, int small)....
Michu93's user avatar

153050per page
close